﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SPMS.Log.Core;

namespace SPMS.Log.Utility
{
    /// <summary>
    /// 空白安全上下文
    /// </summary>
    /// <remarks>提供了安全上下文的空白实现</remarks>
    /// <history>
    /// [zanezeng]               2010/1/13 12:00    创建
    /// </history>
    internal sealed class NullSecurityContext : ISecurityContext
    {
        #region ---ISecurityContext

        /// <summary>
        /// 根据给定的状态对象模拟特定的用户以提升权限
        /// </summary>
        /// <param name="state">包含模拟用户信息的状态对象</param>
        /// <returns>表示提升权限之后的上下文对象</returns>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]               2010/1/13 12:05    创建
        /// </history>
        /// <remarks></remarks>
        /// <history>
        /// [zanezeng]               2010/1/13 12:09    创建
        /// </history>
        public IDisposable Impersonate( object state )
        {
            //返回空引用
            return null;
        }

        #endregion
    }
}
